@import (once) "../../include/vars";
@import (once) "../../include/mixins";

.shortcut {
    width: 84px;
    height: 84px;
    padding: 8px;
    display: inline-flex;
    flex-direction: column;
    font-size: .9rem;
    transition: @transition-short;
    background-color: darken(@light, 5%);
    color: @dark;
    cursor: pointer;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    position: relative;
    align-items: center;
    justify-content: space-between;
    outline: none;

    .icon, .caption {
        display: block;
        line-height: 1;
    }

    .icon {
        display: block;
        vertical-align: middle;
        width: 28px;
        height: 28px;
        font-size: 28px;
        margin-top: 16px;
        order: 1;
    }

    .caption {
        color: inherit;
        height: 20px;
        order: 2;
    }

    .icon ~ .caption {
        margin-top: .875rem;
    }

    .badge {
        position: absolute;
        .px2rem(font-size, 11px);
        top: .25rem;
        right: .25rem;
        color: inherit;
        transform: none;
        background-color: inherit;
    }

    &.no-caption {
        .icon {
            width: 32px;
            height: 32px;
            font-size: 32px;
            margin-top: 24px;
        }
    }

    &:hover {
        background-color: @hoverBackground;
    }

    &.focus, &:focus {
        .focus-show(@lightGray);
    }

    &.outline {
        background: transparent none;
        border-width: 1px;
        border-color: @borderColor;
    }

    &:focus, &:hover, &:active {
        text-decoration: none;
    }

    &:active {
        outline: 0;
        .focus-show(@gray);
    }

    &.disabled, &:disabled {
        opacity: .65;
    }

    &:active {
        box-shadow: none;
    }
}
